<?php
$filename = sha1($_POST['name']);
$filename = "../../../../uploads/message/$filename";
if(file_exists($filename)){
    unlink($filename);
}